package cn.itsource.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @program fccar_tt
 * @Description
 * @Author TT
 * @Date 2024/09/03 19:04
 * @Version 1.0
 */
@Component
@Data
@ConfigurationProperties(prefix = "wechat")
public class WechatConfig {

    private String appid;

    private String secret;

    public static String WUrl =
            "https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code";
    //appid 小程序id
    //private static String appid="wx853b509f586dddea";
    //secret 小程序密钥
    //private static final String secret="18d921785d87e4d74466a57c8b2b52b4";

    public static String ACCESSTOKEN_URL=
            "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";

    public static String PHONENUMBER_URL =
            "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=%s";
}
